<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        // 【json和js对象互相转换】
        
        //JSON.parse()方法，实现从JSON字符串转换为JS对象
        var obj = JSON.parse('{ "a":"hallow","b":"world" } ' ) 
        console.log(obj);//object

        // JSON.stringfy()方法，实现从js对象转换为JSON字符串
        var json = JSON.stringify({ "a":"hai","b":"low"})
        console.log(json);//{"a":"hai","b":"low"}(是个字符串类型)
    </script> 
</body>
</html>